export enum CacheKey {
  /** 左侧导航栏 */
  SIDEBAR_STATUS = "sidebar-status",
  ACTIVE_THEME_NAME = "active-theme-name",
  TOKEN = "token",
  REFRESH_TOKEN = "refresh-token",
  REFRESH_TOKEN_EXP = "rt-exp",
}
export function setToken(token: string) {
  localStorage.setItem(CacheKey.TOKEN, token);
}
export function getToken(): string | null {
  return localStorage.getItem(CacheKey.TOKEN);
}
export function delToken() {
  localStorage.removeItem(CacheKey.TOKEN);
}
export function setStorage(key: string, v: string) {
  localStorage.setItem(key, v);
}
export function getStorage(key: string): string | null {
  return localStorage.getItem(key);
}
